import { createRouter, createWebHistory } from 'vue-router'
import Login from '../page/Login.vue'
import Cart from '../page/Cart.vue'
import Diancai from '../page/diancai.vue'
import Report from '../page/Report.vue'
import Report1 from '../page/Report1.vue' 
import UserProfile from '../page/UserProfile.vue' 

const routes = [
    {
        path: '/',
        redirect: '/diancai'
    },
    {
        path: '/login',
        name: 'Login',
        component: Login
    },
    {
        path: '/diancai',
        name: 'Diancai',
        component: Diancai
    },
    {
        path: '/cart',
        name: 'Cart',
        component: Cart
    },
    {
        path: '/report',
        name: 'Report',
        component: Report
    },
    {
        path: '/report1',
        name: 'Report1',
        component: Report1
    },
    {
        path: '/user-profile',
        name: 'UserProfile',
        component: UserProfile
    }
]

const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router